home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8069 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: news.telalink.net!news
  2. From: daver@nashville.net (David Rawle)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Borland C++ floating point overflow - Help!
  5. Date: 14 Feb 1996 06:14:27 GMT
  6. Organization: Telalink Corporation, Nashville, TN, USA
  7. Message-ID: <4fruk3$73t@adam.telalink.net>
  8. References: <4febl6$5ei@news.acns.nwu.edu>
  9. NNTP-Posting-Host: nash-pm1-a25.telalink.net
  10. Mime-Version: 1.0
  11. X-Newsreader: WinVN 0.99.3
  12.  
  13. In article <4febl6$5ei@news.acns.nwu.edu>, msypherd@merle.acns.nwu.edu 
  14. says...
  15. >
  16. >Thanks for helping - 
  17. >
  18. >        I am runing Borland 4.51 / 4.52 on my P90/16MB  with a Gigabyte 
  19. >motherboard and Award BIOS 4.50<something>.  I am having problems simply 
  20. >entering a floating point number.  Every time I do, I get "Floating 
  21. Point: 
  22. >Overflow"
  23. >
  24. >For example,
  25. >
  26. >#include <iostream.h>
  27. >main()
  28. >{
  29. >        float x;
  30. >        cin >> x;
  31. >        cout << "It doesn't make it this far when I run it";
  32. >        reutrn 0;
  33. >}
  34. >
  35. >        The program compiles fine, but when I run it, I run into 
  36. problems.  If 
  37. >I enter a floating point number, I get the error and the program quits.  
  38. If I 
  39. >enter an int into the float variable 'x', everything works fine.
  40. >
  41. >        Also, if I put a floating point number into an int variable, 
  42. instead 
  43. >of discarding the decimal part, I get a a bizzarre looping of output 
  44. statments 
  45. >that lock up the program.
  46. >
  47. >        Is this a problem with my Computer, or do I have some setting set 
  48. >incorrectly?  Any help would be appreciated.
  49. >
  50. >        I'd rather not pay the 900 number fees for Borland tech support. 
  51.  I 
  52. >think the should at least help me get the program running for the price I 
  53. >paid.  Maybe I'm just an optimist.
  54. >
  55. >        Thanks again,
  56. >
  57. >        Matthew C. Sypherd
  58. >        ------------------
  59. >        msypherd@nwu.edu
  60. >
  61. >p.s.  If you could, please post and e-mail any reply - in case I miss the 
  62. >header.  
  63.  
  64.  
  65. How are you building this project?  You might need to call
  66. _InitEasyWin() first thing in main to initialize stdio. What is the
  67. value you are trying to enter?
  68.  
  69.